package com.hkh.erp.system.api.controller.v1;

import com.hkh.erp.common.api.BasePage;
import com.hkh.erp.common.api.RespResult;
import com.hkh.erp.system.api.provider.UserProvider;
import com.hkh.erp.system.api.request.UserPageRequest;
import com.hkh.erp.system.api.response.UserPageResponse;
import com.hkh.erp.system.core.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController implements UserProvider {

    @Autowired
    private UserService userService;

    @Override
    public RespResult<BasePage<UserPageResponse>> page(UserPageRequest userPageRequest) {
        BasePage<UserPageResponse> page = userService.page(userPageRequest);
        return new RespResult().ok(page);
    }
}
